Skip to content

Fixes unsupported Thorns calculations and related support interactions#1778

Merged
LocalIdentity merged 21 commits into
PathOfBuildingCommunity:devfrom
DS-Koala:thorns-support
May 29, 2026
Merged

Fixes unsupported Thorns calculations and related support interactions#1778
LocalIdentity merged 21 commits into
PathOfBuildingCommunity:devfrom
DS-Koala:thorns-support

Conversation

@DS-Koala

@DS-Koala DS-Koala commented Mar 6, 2026

Copy link
Copy Markdown
Contributor

Adds support for thorns as a standalone damage source and connects that to relevant support interactions. There is now a "Thorns" skill that will appear if you have thorns damage in your build.

Also added a config checkbox for "Currently Shapeshifted?", since shapeshifting isn't only used for active skills (defensive stats and the "Rough Carapace" node check to see if you're shapeshifted).

Includes support for:

  • Typed thorns damage (physical, fire, cold, lightning, chaos)
  • % increased Thorns Damage
  • % increased Thorns Critical Damage Bonus
  • +% / increased Thorns Critical Hit Chance
  • Thorns Damage has % chance to ignore Enemy Armour
  • Gain Physical Thorns Damage equal to % of Item Armour on Equipped Body Armour
  • Gain Physical Thorns Damage equal to % of Maximum Life while Shapeshifted
  • Barbs I / II / III
  • Quill Burst
  • Proper shapeshift condition config support for "while Shapeshifted" effects
  • Icetomb Mail Vestements (Gain Cold thorns damage equal to X% of your maximum Mana)
  • Crackling Barrier (Gain Lightning thorns damage equal to X% of your maximum Mana)
  • Stag Idol's Bonded modifier (Thorns Damage has 40% chance to ignore Enemy Armour)

Description of the problem being solved:

  • Several thorns nodes were unsupported
  • Thorns runes were unsupported
  • Thorns damage sources were unsupported
  • Thorns support gems (Barbs, Quillburst) were unsupported
  • Non-skill gem related "while Shapeshifted" mods did not apply.

Steps taken to verify a working solution:

  • Verified flat typed thorns damage parses correctly and appears in Thorns calcs/breakdown
  • Verified % increased Thorns Damage, crit chance, crit multiplier, and ignore-armour modifiers affect Thorns correctly
  • Verified Barbs I / II apply the thorns payload to supported melee hits and Barbs III applies it twice
  • Verified Quill Burst uses the same thorns payload as a triggered AoE skill
  • Verified "Gain Physical Thorns damage equal to % of Item Armour on Equipped Body Armour" updates Thorns damage
  • Verified "Gain Physical Thorns damage equal to % of maximum Life while Shapeshifted" works with the new shapeshift config condition
  • Verified Caltrops only inherits thorns modifiers, not the full thorns payload
  • Verified breakdown attribution for added min/max and crit-related thorns sources

Link to a build that showcases this PR:

https://pobb.in/icDxyhOiMSLm

After screenshot:

ThornsSkill
SupportDPS
ThornsSourceCalcs
ShapeshiftedConfig
NodeSupport

@DS-Koala

DS-Koala commented Mar 6, 2026

Copy link
Copy Markdown
Contributor Author

Made a small tweak to future-proof the Thorns skill; it will now be displayed if you have any source of "PhysicalThornsMin", "ChaosThornsMax", etc.

Comment thread src/Data/Skills/other.lua Outdated
thorns = true,
},
baseMods = {
flag("CannotBleed"),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is incorrect (though there is no way to demonstrate it available in-game right now). Rather, the issue is that the player’s modifiers that increase the chance of an ailment, or that guarantee that you inflict an ailment, don’t apply to Thorns. I would have to double-check (been a while since I tested it) but I believe effects changing ailment magnitudes are also ignored.

So chill, freeze, flammability, ignite, and shock can happen because cold, fire, and lightning damage have an inherent chance to do those things. Bleed and poison cannot happen because physical and poison damage have no inherent ability to inflict them, and everything that would add them doesn’t apply to Thorns.

I mention this because

  1. future-proofing, in case some ability to bleed or poison with Thorns becomes available
  2. your calculations for the chances of other ailments are wrong if they’re not ignoring those mods

I think ailment calculations are going to have to be redone for, or have a special case for, Thorns hits. This applies both to the default Retaliate with Thorns, and Barbs or Quill Burst.

Comment thread src/Modules/ModParser.lua Outdated
-- Thorns

-- Thorns base damage
["(%d+) to (%d+) physical thorns damage"] = function(_, minStr, maxStr)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Newbie question: can we just use

	["(%d+) to (%d+) (%a) thorns damage"] = function(_, minStr, maxStr, typeStr)
		return {
			flag("GrantsThorns"),
			mod(typeStr .. "ThornsMin", "BASE", tonumber(minStr)),
			mod(typeStr .. "ThornsMax", "BASE", tonumber(maxStr)),
		}
	end,

here? I suppose there’s a risk of a non-(phys/cold/lightning/fire/chaos) entry here, but that seems small.

@LocalIdentity LocalIdentity mentioned this pull request Apr 25, 2026
@krryan krryan mentioned this pull request Apr 26, 2026
1 task
@krryan krryan mentioned this pull request Apr 28, 2026
@LocalIdentity LocalIdentity added the enhancement New feature, calculation, or mod label May 29, 2026
LocalIdentity and others added 2 commits May 29, 2026 22:13
Add back logic to hide thorns skill unless you have base damage in your build
Fix calc offence logic and remove extra lines

@LocalIdentity LocalIdentity left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Want to change a bunch of the logic for this at some point to make it cleaner but will live with this for now
I added back the logic for eabling thorns only when you have a mod that grants it

@LocalIdentity LocalIdentity merged commit e112b12 into PathOfBuildingCommunity:dev May 29, 2026
3 checks passed
bct8925 pushed a commit to bct8925/PathOfBuilding-PoE2 that referenced this pull request Jun 19, 2026
PathOfBuildingCommunity#1778)

* Add support for thorns crit and ignore armour passives

* Add thorns damage support and thorns-based support interactions

* Fix thorns ailment handling and mana scaling (modflag not yet implemented)

* Removed CannotBleed and CannotPoison from ThornsPlayer

* Added support for Stag Idol's Bonded modifier (Thorns Damage has 40% chance to ignore Enemy Armour)

* Update to use ModFlag.Thorns

Changed the calcs to use a ModFlag as it reduces the amount of extra code required
Still need to fix implementation for when Thorns damage is applied to hits

* Fix crash

* Fix Thornskin not working

* Fix Quill Burst thorns damage calculation

* Fix Quill Burst support so it won't be overwritten when re-exporting skills data

* Support for Crackling Barrier support

* Support for thorns damage from Scavenged Plating

* Fix Quill Burst damage calculation more/better?

* Fix thorns damage calculation to consider thorns-flagged skills

* Add basic Barbs support, make Thorns skill unsupportable, remove some unused code

* Fix issue

Add back logic to hide thorns skill unless you have base damage in your build
Fix calc offence logic and remove extra lines

* Fix thorns mod finding logic

* Fix Blistering Bond test

---------

Co-authored-by: LocalIdentity <localidentity2@gmail.com>
Co-authored-by: DragoonWraith (github: krryan) <dragoonwraith@gmail.com>
Co-authored-by: LocalIdentity <31035929+LocalIdentity@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature, calculation, or mod

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants